<!--
 * @Author: your name
 * @Date: 2022-01-21 11:25:37
 * @LastEditTime: 2022-01-21 11:44:27
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \app\src\views\el\excel\index.vue
-->
<template>
  <JsonExcel
    class="export-excel-wrapper"
    :data="exportConfig.list"
    :fields="exportConfig.fields"
    :name="exportConfig.name"
    :header="exportConfig.header"
    :footer="exportConfig.footer"
  >
    <el-button plain class="icon-btn" :disabled="exportConfig.list.length == 0"
      >导出
    </el-button>
  </JsonExcel>
</template>

<script>
import JsonExcel from "vue-json-excel";
export default {
  data() {
    return {
      exportConfig: {
        list: [
          { order: 1001, time: "2021-12-30" },
          { order: 1002, time: "2021-12-31" },
        ],
        fields: { order: "order", time: "time" },
        name: "导出报表",
        header:["标题","标22"],
        footer:"页脚",
      },
    };
  },
  components: { JsonExcel },
};
</script>

<style lang="less" scoped>
</style>